new Vue({
    el: "#content",
    data: {
        page: 1,
        totalPage: "",
        meetingList: [],
        title: "",
        status: ""
    },
    methods: {
        findPage: function (page) {
            if (this.totalPage == 0) {
                this.totalPage = 1;
            }
            if (page < 1) {
                layer.msg("已经是第一页了")
                return;
            }
            if (page > this.totalPage) {
                layer.msg("已经是最后一页了")
                return;
            }
            axios({
                method: "get",
                url: `/meeting/findPage/${page}`,
                params: {
                    title: this.title,
                    status: this.status
                }
            }).then(res => {
                if (res.data.flag) {
                    this.totalPage = res.data.data.totalPage;
                    this.meetingList = res.data.data.rows;
                    this.page = page;
                }
            });
        },
        toDetail: function (meetingId) {
            sessionStorage.setItem("meetingId", meetingId);
            location.href="/html/meeting_detail.html"
        }
    },
    created: function () {
        this.findPage(1);
    }
})